Image processing system with blur measurement and method of operation thereof

ABSTRACT

An image processing system and method of operation includes: an image processing device; an image capture module for capturing a source image on the image processing device; an assessment module for detecting an edge of the source image, and measuring an edge width measure of the edge; and a retrieving module for retrieving a depth of field from the edge width measure.

TECHNICAL FIELD

The present invention relates generally to image processing systems, andmore particularly to an image processing system with automatic focussystem.

BACKGROUND ART

The deployment of high quality images to cameras, medical devices, smartphones, tablet computers, and other information devices with screens hasgrown tremendously in recent years. The wide variety of informationdevices supporting image processing and image understanding requires theability to assess images to estimate a blur measurement for a region ofinput images and to restore the images.

Focal blur, or out-of-focus blur, in images and videos, occurs whenobjects in the scene are placed out of the focal range of the camera. Inmany cases it is desirable to remove the blur and restore the originalscene faithfully. As objects at varying distances are differentlyblurred in the images, accurate blur measurement is essential.

The measurement of the focal blur has also become an important topic inmany other applications, such as restoring the blurred background partof images and videos, digital auto-focusing systems and 2-D to 3-D imageconversion. In an image processing system, such as an optical lenscamera, the camera tries to assess whether images is sharp or blur undercurrent lens setting, and tries to find the correct lens setting for thescene.

Thus, a need still remains for an image processing system that cancreate good quality images with sharp step edges. Such images must beprovided across a wide range of devices having different sizes,resolutions, memory capacity, compute power, and image quality.

In view of the increasing demand for providing high quality sharp imageson the growing spectrum of intelligent imaging devices, it isincreasingly critical that answers be found to these problems. In viewof the ever-increasing commercial competitive pressures, along withgrowing consumer expectations and the diminishing opportunities formeaningful product differentiation in the marketplace, it is criticalthat answers be found for these problems. Additionally, the need to savecosts, improve efficiencies and performance, and meet competitivepressures, adds an even greater urgency to the critical necessity forfinding answers to these problems.

Solutions to these problems have long been sought but prior developmentshave not taught or suggested any solutions and, thus, solutions to theseproblems have long eluded those skilled in the art.

DISCLOSURE OF THE INVENTION

The present invention provides a method of operation of an imageprocessing system including: providing an image processing device;receiving a source image on the image processing device; detecting anedge of the source image; calculating an edge width measure of the edge;and retrieving a depth from the edge width measure.

The present invention provides an image processing system including: animage processing device; an image capture module for capturing a sourceimage on the image processing device; an assessment module for detectingan edge of the source image, and measuring an edge width measure of theedge; and a retrieving module for retrieving a depth of field from theedge width measure.

Certain embodiments of the invention have other aspects in addition toor in place of those mentioned above. The aspects will become apparentto those skilled in the art from a reading of the following detaileddescription when taken with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a lens system of an image processing system with an automaticfocus system in an embodiment of the present invention.

FIG. 2 is an example of the source image of FIG. 1.

FIG. 3 is an intensity plot of the pixel row of FIG. 2.

FIG. 4 is another example of the source image.

FIG. 5 is an intensity plot of the pixel row of FIG. 4.

FIG. 6 is an edge profile of the pixel row of FIG. 2.

FIG. 7 is a gradient profile of the edge profile of FIG. 6.

FIG. 8 is a smoothed gradient profile of the gradient profile of FIG. 7after a smoothing process.

FIG. 9 is an edge width measures plot with regard to the lens settings.

FIG. 10 is an example of an arbitrary image.

FIG. 11 is an arbitrary image of FIG. 10 after Canny edge detection.

FIG. 12 is a gradient profile of a small portion of the binary image ofFIG. 11.

FIG. 13 is a control modules chart of the image processing system ofFIG. 1.

FIG. 14 is a flow chart of a method of manufacturing of the imageprocessing system in a further embodiment of the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

The following embodiments are described in sufficient detail to enablethose skilled in the art to make and use the invention. It is to beunderstood that other embodiments would be evident based on the presentdisclosure, and that process or mechanical changes may be made withoutdeparting from the scope of the present invention.

In the following description, numerous specific details are given toprovide a thorough understanding of the invention. However, it will beapparent that the invention may be practiced without these specificdetails. In order to avoid obscuring the present invention, somewell-known circuits, system configurations, and process steps are notdisclosed in detail.

Likewise, the drawings showing embodiments of the system aresemi-diagrammatic and not to scale and, particularly, some of thedimensions are for the clarity of presentation and are shown greatlyexaggerated in the drawing FIGS. Where multiple embodiments aredisclosed and described, having some features in common, for clarity andease of illustration, description, and comprehension thereof, similarand like features one to another will ordinarily be described with likereference numerals.

The term “module” referred to herein can include software, hardware, ora combination thereof in the present invention in accordance with thecontext used. The term “adjacent” means two or more elements are next toone another.

The term “connected” means that two or more pixels or segments are nextto one another with no intervening elements. The term “directlyconnected” means that two or more pixels or segments are in directcontact with one another with no intervening elements.

In an image processing system, an image processing device can adjust alens system thereof to an appropriate lens setting to capture a sharpimage of a scene or an object. The image processing device can include acamera, video imaging system, or similar optical devices. The camera canhave an automatic focus system, which assesses whether an image is sharpor blur under the current lens setting. A blur measurement is calculatedand provided to the automatic focus system to adjust the lens system tothe correct lens setting for the scene or object.

The lens system of the camera includes an optical lens or assembly oflenses used in conjunction with the camera body and mechanism to makeimages of objects either on photographic film or on other media capableof storing an image chemically or electronically. The lens system caninclude plurality of the lens settings, which are combinations ofpositions of the assembly of lenses. Each of the lens settings has afocus point, where a sharp image can be captured at, regard to theobject and the distance thereof. The focus point of the lens settingmoves when the distance of the object changes. When the focus pointfalls in front of or behind an optical sensor where the source imagecaptured, the source image has blurriness. The measure of the blurrinessdepends on the distance between the optical sensor and the focus point.The blurriness shrinks when the focus point approaches the opticalsensor. The blurriness is minimized when the focus point aligned withthe optical sensor. The camera can adjust the lens system to theappropriate lens setting to realign the focus point to the opticalsensor to capture a sharp image.

The camera featured with the automatic focus system first assesseswhether a source image is sharp or blur under the current lens setting,and then locates and adjusts to the appropriate lens setting to capturea sharp image. One of the essential steps of assessing images ismeasuring a blur extent parameter to infer depth. Embodiment of thisinvention introduces a new method to measure blur extent parameter.

The blur extent parameter is the smear size of a blurred image of apoint object in the original source image. In blurred images, sharpedges expand to small patches where transition areas become much larger.The blurring process can be modeled as convolution of a sharp step edgeand point spread function, wherein convolution is a mathematic operationsimilar to cross-correlation on two functions producing a thirdfunction.

The point spread function (PSF), describes the response of an imagingsystem to a point source or point object. A more general term for thePSF is an impulse response of an optical system. The PSF in manycontexts can be thought of as the extended blob in an image thatrepresents an unresolved object. The degree of spreading or blurring ofthe point object is a measure for the quality of an imaging system. Theimage of a complex object can be seen as a convolution of the trueobject and the PSF.

Blurring is usually modeled as Gaussian blurring. Therefore, the problemof blurring measurement is to identify the Gaussian point spreadfunction. The variance (i.e., second central moment) of point spreadfunction indicates the blur extent parameter. Embodiment of the currentinvention resolves the blurring problem by directly assesses thevariance. The convolution between a step edge and point spread functionresults in a line spread function, and the variance (or second centralmoment) is proportional to the variance of point spread function.Embodiments of the invention propose a method to directly measure thevariance of the line spread function.

First, a Canny edge detector is run to detect the main edge points inthe source image, and the edge direction is calculated at each of themain edge points. The Canny edge detection is a technique utilizing analgorithm named for its inventor, wherein the algorithm is applied to animage file to detect edges.

On directions perpendicular to the detected main edges, image pixels areinterpolated and a gradient profile of the interpolated pixels iscalculated. An image gradient is a directional change in the intensityor color of the source image. The gradient profile is a one dimensionalprofile along the gradient direction of the zero-crossing pixels in theimages. The gradient profile is then smoothed by eliminating smallgradient values less than a threshold.

The variance, or the second central moment, of the smoothed gradientprofile is calculated to serve as the blur measurement. This blurmeasurement can be directly used to infer depth from a single image orused to evaluate blur difference from two images and to infer depthfurther.

Each camera has stored pre-calculated blur measurements with regard tothe lens settings. According to the blur measurement of the sourceimage, the image processing system can retrieve the appropriate lenssetting having the least blur measurement and automatically adjust thelens system to the appropriate lens setting to capture the sharp imageof the object.

Referring now to FIG. 1, therein is shown a lens system of an imageprocessing system 100 with an automatic focus system in an embodiment ofthe present invention. The image processing system 100 can include asource image 102, such as a blur image, captured on an image processingdevice 104, such as a camera. The image processing device 104 caninclude a lens system 106 with plurality of lens settings 108.

The image processing device 104 is a component for receiving the sourceimage 102. The image processing device 104 can include a camera, videoimaging system, or similar optical devices. The image processing device104 can include a computing device that can receive the source image 102from a storage device, a network device, or a combination thereof.

The source image 102 can be a picture of an object 110 or a scene withvarious intensities. The source image 102 can be color, monochromatic,or a combination thereof. The image processing device 104 having thelens system 106 can adjust the lens setting 108 to an appropriateposition to capture a sharp step image 112 for displaying on a displaydevice 114. An image sensor 116 is included in the image processingdevice 104. The image processing device 104 can embed the display device114, or can be coupled to an external display device with acommunication path.

The lens system 106 can have plurality lens settings 108. The object 110is placed in front of the lens system 106 at a distance 118. The sourceimage 102 of the object 110 is captured by the image sensor 116 and canbe processed and displayed on the display device 114. If the lens system106 is not appropriately positioned, the sharp step image 112 isproduced in front or behind the image sensor 116. The source image 102captured by the image sensor 116 and displayed on the display device 114bas a blurriness 120. The magnitude of the blurriness 120 depends on thedistance 118. When the object 110 moves, the distance 118 changes andthe blurriness 120 varies. The embodiment of this invention is regardingthe same object 110 at the same distance 118. When the object is changedor moved, the lens system 106 needs to re-adjust.

By adjusting the lens system 106 to the appropriate lens setting 108,the image sensor 116 can sense and capture the sharp step image 112 andthe sharp step image 112 can be displayed on the display device 114without the blurriness 120. The display device 114 is an electricalcomponent for displaying information. For example, the display device114 can include a monitor, screen, video display, or a combinationthereof.

Although the image processing device 104 and the display device 114 arepresent as a single device, it is understood that the image processingdevice 104 and the display device 114 can be implemented as two separatedevices. For example, the image processing device 104 can include anintegral monitor performing as the display device 114, such as a camerawith a display screen.

Referring now to FIG. 2 therein is shown an example of the source image102 of FIG. 1. The source image 102 has source pixels 202, which areindividual graphical elements can be produced by the image processingdevice 104 and displayed on the display device 114 of FIG. 1. The sourcepixels 202 can have characteristics including a source pixel location204 and source pixel intensity 206.

The source image 102 can be provided in a variety of ways. For example,the source image 102 can be directly formed by the lens system 106 ofFIG. 1. In another example, the source image 102 can be received from aremote system via a file storage device, a network connection, or acombination thereof.

The source image 102 can have the blurriness 120 of FIG. 1 over theentire image. Some of the blurriness 120 can be small and invisible, forexample, the blurriness 120 in the dark section and bright section arevery small. However, the blurriness 120 in a blur step edge 208 issignificantly visible.

The source pixel intensity 206 represents the brightness of the sourcepixel 202. The brighter source pixels 202 have greater values of thesource pixel intensities 206. For example, a darker source pixel haslower source pixel intensity 206 than a brighter source pixel. Thesource pixel intensity 206 is variable. In color image systems, a coloris typically represented by three or four component intensities such asred, green, and blue, or cyan, magenta, yellow,

Each of the source pixel 202 represents a digitized source image has thesource pixel intensity 206 describing how bright that source pixel 206is, and/or what color it should be. In the simplest case of binaryimages, the source pixel intensity 206 is a 1-bit number indicatingeither foreground or background. For a grayscale images, the sourcepixel intensity 206 is a single number that represents the brightness ofthe pixel. The most common source pixel intensity format is the byteimage, where this non-unit number is stored as an 8-bit integer giving arange of possible values from 0 to 255. Typically zero is taken to beblack, and 255 is taken to be white. Values in between make up thedifferent shades of gray.

To represent color images, separate red, green and blue components mustbe specified for each of the source pixel 202 (assuming an RGBcolorspace), and so the source pixel intensity 206 is actually a vectorof three numbers. Often the three different components are stored asthree separate “grayscale” images known as color planes (one for each ofred, green and blue), which have to be recombined when displaying orprocessing.

The actual grayscale or color component intensities for each of thesource pixel 202 may not actually be stored explicitly. Often, all thatis stored for each pixel is an index into a colormap in which the actualsource pixel intensity 206 or colors can be looked up.

Although simple 8-bit integers or vectors of 8-bit integers are the mostcommon sorts of the source pixel intensity 206 used, some image formatssupport different types of value, for instance 32-bit signed integers orfloating point values. Such values are extremely useful in imageprocessing as they allow processing to be carried out on the image wherethe resulting source pixel intensities 206 are not necessarily 8-bitintegers. If this approach is used then it is usually necessary to setup a colormap which relates particular ranges of pixel values toparticular displayed colors.

The source image 102 is constructed by rows and columns of the sourcepixels 202. The numbers of the rows and columns of the source pixels 202represent a source image resolution. A pixel row 210 starts from avertical edge 212 to an opposite vertical edge 214 of the source image102. The pixel row 210 contains a single line of the source pixels 202.The height of the pixel row 210 is the height of the source pixel 202.The width of the pixel row 210 is the width of the source image 102.

In the pixel row 210, the source pixel intensities 206 are constant inthe dark and bright section, but increased transitionally in the blurstep edge 208. The width of the blur step edge 208 indicates how blurredthe source image 102 is. A blurrier source image has a wider blur stepedge, and a sharper source image has a narrower blur step edge.

Referring now to FIG. 3, therein is shown an intensity plot 302 of thepixel row 210 of FIG. 2. The pixel row 210 is constructed with a singleline of the source pixels 202 of FIG. 2. Each of the source pixels 202has the corresponding source pixel location 204 and source pixelintensity 206. The intensity plot 302 illustrates the source pixelintensities 206 with regard to the source pixel location 204.

The source pixel locations 204 start from the vertical edge 212 to theopposite vertical edge 214 of the source image 102 of FIG. 2. Forexample, the pixel row 210 can be constructed with a single line of 300source pixels 202. The corresponding source pixel locations 204 startsfrom location 0 at the vertical edge 212 to location 300 at the oppositevertical edge 214.

The intensity plot 302 is plotted by connecting each of the source pixelintensity 206 with a continuous line. The magnitude of the source pixelintensity 206 can range from 0 to 15,000. Depends on the sensitivity ofthe image sensor 116 of FIG. 1, the range of outputs of the source pixelintensity 206 can be various. The outputs of the image sensor 116 can bedigitized as n bits, wherein n is an integer. The digitized outputs ofthe image sensor 116 fits in the range of 0-(2^(n)−1). For example, whenthe outputs of the image sensor 116 are digitized as 14 bits, the sourcepixel intensities 206 are ranged within 0-(2¹⁴−1), which is 0-16383.

A width 304 of the blur step edge 208 indicates how blurred the sourceimage 102 is. The blurrier source image 102 has the wider width 304. Inthe blur step edge 208, the source pixel intensities 206 transitionallyincrease. A darker section 306 having lower source pixel intensities 206and a brighter section 308 having higher source pixel intensities 206are located at each side of the blur step edge 208. The source pixelintensities 206 are constant with slight glitches 310 in the darkersection 306 and brighter section 308. The glitches 310 describe slightchanges of the source pixel intensities 206.

Referring now to FIG. 4, therein is shown another example of the sourceimage 400. The source image 400 has source pixels 402, which areindividual graphical elements can be produced by the image processingdevice 104 and displayed on the display device 114 of FIG. 1. The sourcepixels 400 can have characteristics including a source pixel location404 and source pixel intensity 406. For example, the source image 400can be a sharp image of the object 110 of FIG. 1 captured by a camerawith the appropriate lens setting 108 of FIG. 1.

The source image 400 can be provided in a variety of ways. For example,the source image 400 can be directly formed by the optical lens system106 of FIG. 1. In another example, the source image 400 can be receivedfrom the remote system via the file storage device, the networkconnection, or a combination thereof.

The source image 400 can have the blurriness 120 of FIG. 1 over theentire image. Some of the blurriness 120 can be small and invisible, forexample, the blurriness 120 in the dark section and bright section arevery small. However, the blurriness 120 in a blur step edge 408 issignificantly visible.

The source pixel intensity 406 represents the brightness of the sourcepixel 402. The brighter source pixels 402 have greater values of thesource pixel intensities 406. For example, a darker source pixel haslower source pixel intensity 406 than a brighter source pixel.

The source image 400 is constructed by rows and columns of the sourcepixels 402. The numbers of the rows and columns of the source pixels 402represent a source image resolution. A pixel row 410 starts from avertical edge 412 to an opposite vertical edge 414 of the source image400. The pixel row 410 contains a single line of the source pixels 402.The height of the pixel row 410 is the height of the source pixel 402.The width of the pixel row 410 is the width of the source image 400.

In the pixel row 410, the source pixel intensities 406 are constant inthe dark and bright section, but increased transitionally in the blurstep edge 408. The width of the blur step edge 408 indicates how blurredthe source image 400 is. A blurrier source image has a wider blur stepedge, and a sharp source image has a narrower blur step edge.

Referring now to FIG. 5, therein is shown an intensity plot 502 of thepixel row 410 of FIG. 4. The pixel row 410 is constructed with a singleline of the source pixels 402 of FIG. 2. Each of the source pixels 402has the corresponding pixel location 404 and source pixel intensity 406.The intensity plot 502 illustrates the source pixel intensities 406 withregard to the source pixel location 404.

The source pixel location 404 starts from the vertical edge 412 to theopposite vertical edge 414 of the source image 400 of FIG. 4. Forexample, the pixel row 410 can be constructed with a single line of 300source pixels 402. The corresponding pixel locations 404 starts fromlocation 0 at the vertical edge 412 to location 300 at the oppositevertical edge 414.

The intensity plot 502 is plotted by connecting each of the source pixelintensity 406 with a continuous line. The magnitude of the source pixelintensity 406 can be ranging from 0 to 15,000. Depends on thesensitivity of the image sensor 116 of FIG. 1, the range of outputs ofthe source pixel intensities 406 can be various. The outputs of theimage sensor 116 can be digitized as n bits, wherein n is an integer.The digitized outputs of the image sensor 116 fits in the range of0-(2̂n−1). For example, when the outputs of the image sensor 116 aredigitized as 14 bits, the source pixel intensity 406 is ranged0-(2̂14−1), which is 0-16383.

A width 504 of the blur step edge 408 indicates how blurred the sourceimage 400 is. The blurrier source image 400 has the wider width 504. Inthe blur step edge 408, the source pixel intensities 406 transitionallyincrease. A darker section 506 having lower source pixel intensities 406and a brighter section 508 having higher source pixel intensities 406are located at each side of the blur step edge 408. The source pixelintensities 206 are constant with slight glitches 510 in the darkersection 506 and brighter section 508. The glitches 510 describe slightchanges of the source pixel intensities 406.

Compared with the source image 102 of FIG. 2, the source image 400 has ashorter or sharper transition from the darker section 506 to thebrighter section 508. The width 504 is less than the width 304 of FIG.3. The source image 400 has a smaller width measurement than the sourceimage 102 captured with the different lens setting 108 of FIG. 1.

Referring now to FIG. 6, therein is shown an edge profile 600 of thepixel row 210 of FIG. 2. The edge profile 600 shows the source pixelintensities 206 with regard to the source pixel locations 204.

The edge profile 600 is a continuous line connecting the source pixelintensities 206 as a function of the source pixel location 204. The edgeprofile 600 shows changes of the source pixel intensities 206 betweentwo adjacent source pixels 202 of FIG. 2. In the darker section 306 orbrighter section 308, the source pixel intensities 206 have zero orslight changes. The edge profile 600 in the darker section 306 and thebrighter section 308 are flat lines 602 with the glitches 310. In theblur step edge 208, the source pixel intensities 206 increasetransitionally. The edge profile 600 in the blur step edge 208 is aslope 604 connecting the flat lines 602. The slope 604 describes thatthe changes of the source pixel intensity 206 between two adjacentsource pixels 202 are linear and greater than zero. The width 304 of theslope 604 describes the magnitude of the blurriness 120 of FIG. 1. Thegreater width 304 indicates that the source image 102 of FIG. 2 isblurrier.

For example, the source image 102 shows the brightness of the sourcepixels 202 in the darker section 306 and brighter section 308 isconstant with invisible changes. The source image 102 shows the sourcepixels 202 in the blur step edge 208 changes from dark to brighttransitionally.

Referring now to FIG. 7, therein is shown a gradient profile 700 of theedge profile 600 of FIG. 6. The gradient profile 700 shows changes 702of intensity differences between two adjacent source pixels 202 of FIG.2 in the direction of increasing the source pixel locations 204. Thegradient profile 700 can be obtained by calculating first derivative ofthe edge profile 600 along the blur step edge 208.

The width 304 of FIG. 6 can be determined by calculating second momentof the gradient profile 700 in a function of form:

μ₂=∫_(-∞) ^(∞)(x−c)²ƒ(x)dx

Wherein:

-   -   μ₂ is the second moment,    -   x is a random variable within a range of (−∞, ∞)    -   ƒ(x) is a function of the variable x, and    -   c is a constant. c=∫_(-∞) ^(∞)xƒ(x)dx

For example, in the gradient profile 700, x is the source pixellocations 204, and ƒ(x) is the function of x within a range of (−∞, ∞).The gradient profile 700 graph is a symmetrical “bell” 704 having a peakin the middle of the source pixel location 204, and quickly falls offtowards zero. The changes 702 describe the changes of the intensitydifferences of the adjacent source pixels 202. The glitches 310 of theedge profile 600 of FIG. 6 are amplified as noises 706 when calculatingfirst derivative of the edge profile 600. The gradient profile 700 is acontinuous line with plurality of the noise 706 extended to both sidesof the continuous line. The noise 706 can be positive or negative whilethe magnitudes of the noises 706 are various.

Outputs of the image sensor 116 are not exactly proportional to lightenergy that hit the image sensor 116. The discrepancies of the realoutputs and ideal outputs are the noises 706. The noises 706 cancomprise various noises. The majority of the noises 706 are thermalnoise of the image sensor 116. Thermal noise is the electronic noisegenerated by the thermal agitation of the charge carriers inside anelectrical conductor at equilibrium, which happens regardless of anyapplied voltage. When limited to a finite bandwidth, thermal noise canhave a nearly Gaussian amplitude distribution.

Corresponding to the source image 102 of FIG. 2, in a darker section708, the changes 702 are distributed along the line of “0” with smallmagnitudes of the noises 706. When the changes 702 are distributed alongthe line of “0”, the intensity differences of the adjacent source pixels202 are constant zero with small changes. The changes 702 in the darkersection 708 are concentrated at expected value μ=0 with the noises 706above or below the line of “0”. The noises 706 is above the expectedvalue μ when the current intensity difference is greater than a previousone, or is below the expected value μ when the current intensitydifference is less than the previous one.

In a brighter section 710, the changes 702 are distributed along theline of “0” with greater magnitudes of the noises 706. The changes 702are distributed along the line of “0”, and the intensity differences ofthe adjacent source pixels 202 are constant zero with greater changes.The changes 702 in the brighter section 710 are concentrated at expectedvalue μ=0 with the noises 706.

Within a blur step edge 712, a transition of brightness changes fromdark to bright along the direction of increasing the source pixellocation 204. The changes 702 are distributed along the contour of thesymmetrical “bell” 704. The intensity differences of the adjacent sourcepixels 202 are concentrated at the expected value μ along the contour ofthe symmetrical “bell” 704. The noises 706 can extend to both sides ofthe contour of the symmetrical “bell” 704, depends on the currentintensity difference of the adjacent source pixels 202 is greater thanor less than the previous one.

A width 714 of the blur step edge 712 can be measured by calculatingsecond moment of the gradient profile 700. By measuring the width 714 ofthe blur step edge 712, the image processing system 100 can estimate theblurriness of the source image 102, and further retrieve the lenssetting 108.

Small blurriness of the source image 102 is invisible. The smallglitches 310 of the edge profile 600 are amplified when calculatingfirst derivative of the edge profile 600, and shown as the noises 706 inthe gradient profile 700. More and greater noises 706 can impact theaccuracy of blurring measurement.

The gradient profile can be modeled with various functions. For example,the gradient profile 700 can be modeled with Gaussian function, in afunction of form:

${f(x)} = {a\frac{1}{\sigma \sqrt{2\; \pi}}{\exp ( {- \frac{( {x - u} )^{2}}{2\; \sigma^{2}}} )}}$

Wherein:

-   -   x is the source pixel locations 204,    -   a, b, c and d are constants, and    -   ƒ(x) is the gradient profile 700 modeled with Gaussian function.

Since the second moment of the gradient profile 700 is variance σ² whenthe gradient profile 700 is modeled with the Gaussian function, thewidth 714 equals variance σ².

Referring now to FIG. 8, therein is shown a smoothed gradient profile800 of the gradient profile 700 of FIG. 7 after a smoothing process. Asdiscussed above, the gradient profile 700 has plurality of the noises706 of FIG. 7, which are results of amplified glitches 310 of FIG.

In order to improve noise robustness, the small gradient values lessthan a gradient threshold is eliminated from the gradient profile 700.The gradient threshold can be set within a range of 0-½. For example,when the gradient threshold is ⅛, the gradient values less than ⅛ of themaximal gradient can be removed from the gradient profile 700 beforecalculating the second moment thereof, wherein the maximal gradient isthe greatest gradient value in the gradient profile 700.

The gradient threshold can be an experimental adjustable value within arange of 0-½. The experimental adjustable value that can be adapted tosmooth out most of the noises 706 can be set as the gradient threshold.

Smoothing methods of the gradient profile 700 can be used to eliminatethe noises 706. The gradient profile 700 can be modeled with Gaussianfunction, and then be smoothed out before normalization. Thenormalization may refer to adjustments which bring the entireprobability distributions of adjusted gradient values into alignment.The width 714 of FIG. 7 can be measured by calculating the second momentof the smoothed gradient profile 800. Different object at differentdistance can have different smoothed gradient profiles under the samelens setting 108. The normalization can consolidate various smoothedgradient profiles as a unique smoothed gradient profiles 800 describingthe lens setting 108.

It has been discovered, smoothing out the noises of the gradient profilecan eliminate all the small gradients less than the gradient threshold.The blur measurement process needs less data to be processed, reducescalculation time, and improves the edge width measurement accuracy.

Referring now to FIG. 9, therein is shown an edge width measures plot900 with regard to the lens settings 108. The edge width measures plot900 can include a group of parabolic curves 902. Each of the paraboliccurves 902 has a corresponding depth of field (DOF). Depth of field(DOF) describes the distance between the nearest and farthest objects ina scene that appears acceptable sharp in the source image 102 of FIG. 1.The lens system 106 of FIG. 1 can precisely focus on the object 110 ofFIG. 1 at a focus point. However the decrease in sharpness is gradual oneach side of the focused point. Within the DOF, the blurriness isimperceptible under normal viewing conditions. Depending on the lenssystem 106 and other factors including aperture or sensor size, the DOFis reversely proportional to distance unit. The DOF is linear to1/distance.

The group of the parabolic curves 902 describes edge width measurements906 at sequences of the distance 118 of FIG. 1. When the object 110moves, changes of the distance 118 causes the parabolic curve 902 moveshorizontally. For each of the distances 118, the parabolic curves 902can be plotted by calculating second moment of the smoothed gradientprofile 800 of FIG. 8. For the sequences of the distance 118, a group ofthe parabolic curves 902 with identical shapes can be plotted.

After the edge width measure 906 is calculated, it can be fitted intoone of the parabolic curves 902 at the current lens setting 108. Each ofthe lens settings 108 corresponds to one of the depths of field (DOF)and a sequences of an edge width measures 906 obtained by calculatingsecond moment of the smoothed gradient profile 800.

The edge width measures plot 900 illustrates the edge width measures 906of a vertical step edge sequence in the direction of increasing lenssettings 108 of the same image processing device 104 of FIG. 1,capturing the same object 110 but at sequences of the distances 118. Foreach of the distance 118, the corresponding edge width measures 906 ofthe various lens settings 108 are pre-calculated and stored in the edgewidth measures plot 900 or look up tables.

At the distance 118, there is an optimal lens setting 910 having theleast edge width measure 906, at a lowest point 912 of the paraboliccurve 902. The image captured at the optimal lens setting 910 is thesharpest image. For example, when the source image 400 of FIG. 4 iscaptured with the optimal lens setting 910, the source image 400 is thesharpest source image and has the narrowest blur step edge.

The edge width measures 906 gradually increase from the lowest point 912at both side of the optimal lens setting 910. The increased edge widthmeasure 906 describes the increased blurriness 120 of FIG. 1 in thecaptured source image 102.

For the lens system 106 of FIG. 1, the corresponding edge width measure906 is calculated along the vertical step edge. The image processingsystem 100 of FIG. 1 can fit the edge width measure 906 and thecorresponding lens setting 108 in one of the parabolic curves 902 or thelook up table. Through the parabolic curve 902 or the look up tables, anautomatic focus system can retrieve the optimal lens setting 910 havingthe least edge width measure 906. The lens system 106 can be adjusted tothe optimal lens setting 910 and capture a sharp image.

Referring now to FIG. 10, therein is shown an example of an arbitraryimage 1000. The arbitrary image 1000 can have arbitrary blur step edges1002 in the entire image and may point to various directions.

The arbitrary image 1000 can be provided in a variety of ways. Forexample, the arbitrary image 1000 can be directly formed by optical lensof the image processing device 104 of FIG. 1. In another example, thearbitrary image 1000 can be received from a remote system via a filestorage device, a network connection, or a combination thereof.

Referring now to FIG. 11, therein is shown the arbitrary image 1000 ofFIG. 10 after Canny edge detection. The Canny edge detection utilizes aCanny edge detector, which is an edge detection operator that uses amulti-stage algorithm to detect a wide range of edges in images. TheCanny edge detection is a technique capable of identifying the sub-pixellocation of a step edge based on basic device characteristics. The Cannyedge detector can identify boundaries within the images that can belocalized with high precision and accuracy.

The Canny edge detector is utilized to detect arbitrary edges 1102 withsingle pixel width at maximal gradient magnitude, such as the maximalgradient of FIG. 8. The arbitrary edges 1102 can point to arbitrarydirections, such as vertical, horizontal or diagonal. Each of thehorizontal or diagonal edge can be considered as an angled vertical stepedge.

The result of the Canny edge detection is a binary image 1100 of theoriginal arbitrary image 1000 with vertical, horizontal and diagonaledges in the blurred image 1100. Each of the pixels in the binary image1100 has a horizontal locator x and a vertical locator y. The positionof the pixel is a function of p(x, y), wherein x and y are integers.

Referring now to FIG. 12, therein is shown a gradient profile 1200 of asmall portion of the binary image 1100 of FIG. 11. After running theCanny edge detection on the arbitrary image 1000 of FIG. 10, a detectededge pixel 1202 is detected along each of the arbitrary edges 1102 ofFIG. 11. The detected edge pixels 1202 are the single pixels which hasthe maximal gradient of FIG. 11.

An edge direction 1204 is calculated at each of the detected edge pixels1202 of the binary image 1100. For each of the edge pixels 1202 atlocation (x, y), edge directions of the edge pixels 1202 as functions ofI(x, y), is calculated as a form of:

argtan 2(dy, dx),

-   -   where        -   dy=I(x, y+1)−I(x, y−1),        -   dx=I(x+1, y)−I(x−1, y).

Perpendicular to each of the edge directions 1204, interpolated pixels1208 are interpolated along an interpolation path 1206. In a similarfashion of calculating the gradient profile 700 of FIG. 7 for thevertical step edge, the gradient profile 1200 of the arbitrary edges1102 is constructed by calculating first order derivative of theinterpolated pixels 1208 for each of the detected edge pixels 1202.

The gradient profile 1200 illustrates the first order derivative of thedetected edges pixels 1202 of the arbitrary image 1000, using the binaryimage 1100 as a location guidance of the detected edge pixels 1202.Different contours 1210 of the gradient profile 1200 describingmagnitudes of gradients are plotted with regard to the pixel locationp(x, y), wherein x and y are integers.

Random edge width measures are measured by calculating second moments ofthe gradient profile 1200. A smoothing process in a similar fashion ofthe smoothing process of FIG. 8 is adapted to remove small values of thegradients. After eliminating the noises of the gradient profile, therandom edge width measures are measured by calculating second moments ofthe smoothed gradient profile.

Similar to the parabolic curves 902 of FIG. 9, the random edge widthmeasures are calculated with regard to the lens settings 108 of FIG. 1.The optimal lens setting 910 of FIG. 9 can be retrieved at the leastrandom edge width measure through a group of the random edge widthmeasures or look up tables. The automatic focus system can adjust thelens system 106 of FIG. 1 to the optimal lens setting 910 and capture asharp image.

In addition to application of the automatic focus process, the edgewidth blur measurement of a second embodiment of the current inventioncan be used to estimate the sharpness from a single image, and furtherretrieve the depth of field thereof.

Theoretically, the edge width blur measure is the variance of a linespread function. The edge width blur measure is proportional to thepoint spread function introduced by the lens system of the imageprocessing device. The edge width blue measures are parabolic curveswith regard to the lens settings. The image processing system canretrieve the depth of the image is captured, through the edge width blurmeasures look up tables or fitted in the parabolic curves. Additionally,the edge width blur measurement of a third embodiment of the currentinvention can be used to estimate the depths of field from multipleimages.

The blur extents of two different blurred images can be measured usingedge width blur measurement. The blur difference between the two blurredimages can be calculated with various methods, for example, directlyfrom the edge width blur measurement method. Since blur difference islinear with regard to the lens settings and the depths of field, thedepths can be directly inferred from the edge width blur measures curvesor look up tables.

Referring now to FIG. 13, therein is shown a control modules chart 1300of the image processing system 100 of FIG. 1. The control modules chart1300 can include an image capture module 1302, an assessment module1304, a retrieving module 1306, and an adjustment module 1308. Theassessment module 1304 can include an edge detect module 1310, aninterpolation module 1312, an edge profile module 1314, a gradientprofile module 1316, a smoothing module 1318, and an edge measure module1320.

The image capture module 1302 can generate the source image 102 ofFIG. 1. The image capture module captures the source image 102 of theobject 110 with the image processing device 104, and displaying thesource image 102 on the display device 114, of FIG. 1. The source image102 having the source pixels 202 of FIG. 2 can be provided to theassessment module 1304 for evaluation.

Each of the source pixels 202 has the source pixel intensity 206 of FIG.2 indicating the brightness of the source pixel 202 sensed by the imagesensor 116 of FIG. 1. The blurriness 120 of FIG. 1 can be lessperceptible in texture-less area, and can be more perceptible in theblur step edge 208 of FIG. 2, where the pixel intensities 206 changestransitionally from low to high. The pixel row 210 of FIG. 2 comprisinga single row of the source pixels 202, crossing from one vertical edgeto the opposite vertical edge.

The image capture module 1302 can capture the vertical step edge imageor the arbitrary image 1000 of FIG. 10. The arbitrary image 1000 hasedges including the vertical step edge of the source image 102, and thearbitrary blur step edges 1002 of FIG. 10, which can point to variousdirections.

The assessment module 1304 can evaluate the blurriness 120 of the sourceimage 102 or arbitrary image 1000, and provide feedback to theretrieving module 1306. The assessment module 1304 can include the edgedetect module 1310, which can detect the blur step edge 208 in thesource image 102 and the arbitrary blur step edges 1002 of the arbitraryimage 1000. The edge detect module 1310 can include the Canny edgedetector of FIG. 11.

The arbitrary edges 1102 can point to arbitrary directions, includingvertical, horizontal and diagonal. The Canny edge detector can be usedto detect arbitrary edges 1102 with the single pixel width at themaximal gradient magnitude of FIG. 8, result in the binary image 1100 ofFIG. 10. The binary image 1100 is provided to the interpolation module1312 for interpolation.

The interpolation module 1312 can identify the edge pixels 1202,calculate the edge directions 1204, and interpolate the interpolatedpixels 1208 along the interpolation path 1206 perpendicular to the edgedirection 1204, of FIG. 12.

For example, for the blur step edge 208, the vertical edge is the edgedirection, the pixel row 210 is interpolated horizontally, andperpendicular to the vertical edge direction of the blur step edge 208,the single pixel of the pixel row which has the maximal gradientmagnitude is identified as the edge pixel.

For the arbitrary edges 1102, the edge pixels 1202 are the single pixelsat where the arbitrary edges 1102 detected. At each of the edge pixels1202, the edge direction 1204 is calculated on a computing device of theimage processing system 100. The computing device can be embedded in theimage processing device 104, or can be an individual device including acomputer. Perpendicular to the edge directions 1204, the interpolationpaths 1206 are created and the interpolation pixels 1208 areinterpolated along the interpolation paths 1206.

The edge profile module 1314 can calculate and plot the source pixelintensities 206 of the pixel row 210 with regard to the source pixellocations 204 of FIG. 2 to generate the edge profile 600 of FIG. 6. Theedge profile 600 describes the source pixel intensities 206 with regardto the source pixel locations 204. The edge profile 600 includes theflat lines 602 of FIG. 6 when the source pixel intensities 206 areconstant and the slope 604 of FIG. 6 when the source pixel intensities206 increase transitionally.

The edge profile 600 is a continuous line connecting the source pixelintensities 206 as a function of the source pixel location 204. The edgeprofile 600 shows changes of the source pixel intensities 206 betweentwo adjacent source pixels 202.

The gradient profile module 1316 can calculate the gradient profile 700of FIG. 7 of the edge profile 600, on the computing device of the imageprocessing system 100. The gradient profile 700 illustrates changes 702of FIG. 7 of the differences of the source pixel intensities 206 betweentwo adjacent source pixels 202, in the direction of increasing thesource pixel locations 204. The gradient profile 700 can be obtained bycalculating first derivative of the edge profile 600 along the blur stepedge 208.

The gradient profile 700 is a function of the source pixel location 204,and can be optional modeled with Gaussian function. when the gradientprofile 700 is modeled with Gaussian function, the gradient profile 700graph is a symmetrical “bell” 704 of FIG. 7 having a peak in the middleof the source pixel location 204, and quickly falls off towards zero.The changes 702 describe the changes of the intensity differences of theadjacent source pixels 202. The glitches 310 of FIG. 6 are amplified asthe noises 706 of FIG. 7 when calculating first derivative of the edgeprofile 600. The gradient profile 700 is a continuous line withplurality of the noise 706 oscillating above or below the mean value orexpected value μ of FIG. 7.

In the darker section 708 of FIG. 7, the changes 702 are distributedalong the line of “0” with small magnitudes of the noises 706. When thechanges 702 are distributed along the line of “0”, the intensitydifferences of the adjacent source pixels 202 are constant with smallchanges, with the expected value μ=0. The noises 706 can be above theexpected value μ when the current intensity difference is greater than aprevious one, or can be below the expected value μ when the currentintensity difference is less than the previous one.

In the brighter section 710 of FIG. 7, the changes 702 are distributedalong the line of “0” with greater magnitudes of the noises 706. Theintensity differences of the adjacent source pixels 202 are constantwith greater changes in the brighter section 710. The noise 706 can beabove the expected value μ=0 when the current intensity difference isgreater than a previous one, or can be below the expected value μ=0 whenthe current intensity difference is less than the previous one.

In the blur step edge 712 of FIG. 7, a transition of brightness occursfrom dark to bright in the direction of increasing the source pixellocation 204. The changes 702 are distributed along the contour of thesymmetrical “bell” 704. The noises 706 can extend to both sides of theexpected value μ depending on the current intensity difference isgreater than or less than the previous one, wherein the expect value μfollows the contour of the symmetrical “bell” 704.

The smoothing module 1316 can eliminate the noises 706 of the gradientprofile 700 to generate the smoothed gradient profile 800 of FIG. 8. Thenoises 706 can impact the accuracy of the edge width measurement 906 ofFIG. 9 and increase the data amount need to be processed. To improvenoise robustness, the small gradient values less than the gradientthreshold of FIG. 8 are eliminated from the gradient profile 700.

The gradient threshold can be an adjustable experimental value within arange of 0-½. The value that can be adapted to smooth out most of thenoises 706 is set as the gradient threshold. For example, when thegradient threshold is set to ⅛, any gradient less than ⅛ of the maximalgradient can be eliminated from the gradient profile 700, wherein themaximal gradient is the greatest gradient value in the entire gradientprofile 700. The small gradient values can be removed from the gradientprofile 700 before calculating the second moment thereof.

The smoothing methods, including the normalization of the gradientprofile 700, can be used to eliminate the noise 706. The gradientprofile 700 can be modeled with Gaussian function before thenormalization. The normalization may refer to adjustments which bringthe entire probability distributions of adjusted gradient values intoalignment. The smoothed gradient profile 800 is a continuous smooth linewithout the noises 706.

It has been discovered, smoothing module can smooth out the noises ofthe gradient profile eliminates all the small gradients less than thegradient threshold. The smoothing process can reduce the data amountneed to be processed, and further reduces the processing time andimprove the edge width measurement accuracy.

The edge measure module 1320 can measure the width 714 of FIG. 7 bycalculating second moment of the smoothed gradient profile 800. Thewidth 714 represents the blurriness of the source image. The wider width714 indicates the source image is blurrier. The narrower width 714indicates the source image is sharper. For the same image processingdevice, each of the edge width measures 906 has the corresponding lenssetting 108. By calculating the edge width measures 906, thecorresponding lens setting 108 can be retrieved.

A lens data module 1322 can generate the edge width measures plot 900,which can include a group of parabolic curves 902 or look up tables ofFIG. 9 with regard to the lens settings 108 having the correspondingdepth of field (DOF) of FIG. 9. The edge width measures plot 900 can bepre-calculated and stored in the computing device, which can include adata storage unit.

The edge width measures 906 are illustrated as the parabolic curves 902,with regard to the lens settings 108. When the object 110 moves, thedistance 118 changes resulting that the parabolic curve 902 moveshorizontally. For sequences of the distance 118, a group of theparabolic curves 902 with identical shapes can be plotted.

The image processing devices 104 can have its unique edge width measuresplot 900 because of the unique lens system 106 thereof. The storedpre-calculated edge width measures can be a group of parabolic curves902 or look up tables. The stored pre-calculated edge width measures maynot be interchangeable to other image processing devices.

Each of the parabolic curves 902 has a lowest point 912 of FIG. 9 havingthe corresponding optimal lens setting 910 of FIG. 9. The edge widthmeasures 906 of the parabolic curve 902 are gradually increase from thelowest point 912 at both side of the optimal lens setting 910. Theincreased edge width measure 906 describes the increased blurriness 120in the captured source image 102. The lowest edge width measure 906describes the least blurriness. The source image captured with theoptimal lens setting 910 is the sharpest image that the image processingdevice can produce.

The retrieving module 1306 can retrieve the depth of the source image102. By fitting the edge width measures 906 into the storedpre-calculated parabolic curves 902 or the look up tables, theretrieving module 1306 can retrieve the corresponding DOF, and furtherretrieve the lens setting 108 of the source image 102 from one of theparabolic curves 902.

The adjusting module 1308 can adjust the lens setting 108 according tothe optimal lens setting 910 retrieved in the retrieve module 1306. Theimage capture module 1302 can capture a sharp image with the optimallens setting 910.

Referring now to FIG. 14, therein is shown a flow chart of a method 1400of operation of the image processing system 100 of FIG. 1 in a furtherembodiment of the present invention. The method includes providing animage processing device in a block 1402; receiving a source image on theimage processing device in a block 1404; detecting an edge of the sourceimage in a block 1406; calculating an edge width measure of the edge ina block 1408; and retrieving a depth from the edge width measure in ablock 1410.

It has been discovered that the embodiment of present invention providesmethod of estimating edge width measurement in a fast and accuratefashion. The method of the embodiment of present invention needs lessimage information to process results in a simpler and faster method. Themethod provides more accurate edge width measurement to an automaticfocus system to retrieve a more appropriate lens setting to capture asharper image, or to retrieve a more accurate depth of the image.Reduced processing time improves the operation speed of the automaticfocus system.

It has been discovered that the present invention thus has numerousaspects. The present invention valuably supports and services thehistorical trend of simplifying systems and increasing performance.These and other valuable aspects of the present invention consequentlyfurther the state of the technology to at least the next level.

Thus, it has been discovered that the image processing system of thepresent invention furnishes important and heretofore unknown andunavailable solutions, capabilities, and functional aspects forefficiently auto-segmenting images. The resulting processes andconfigurations are straightforward, cost-effective, uncomplicated,highly versatile and effective, can be surprisingly and unobviouslyimplemented by adapting known technologies, and are thus readily suitedfor efficiently and economically manufacturing image processing devicesfully compatible with conventional manufacturing processes andtechnologies. The resulting processes and configurations arestraightforward, cost-effective, uncomplicated, highly versatile,accurate, sensitive, and effective, and can be implemented by adaptingknown components for ready, efficient, and economical manufacturing,application, and utilization.

While the invention has been described in conjunction with a specificbest mode, it is to be understood that many alternatives, modifications,and variations will be apparent to those skilled in the art in light ofthe aforegoing description. Accordingly, it is intended to embrace allsuch alternatives, modifications, and variations that fall within thescope of the included claims. All matters hithertofore set forth hereinor shown in the accompanying drawings are to be interpreted in anillustrative and non-limiting sense.

What is claimed is:
 1. A method of operation of an image processingsystem comprising: providing an image processing device; receiving asource image on the image processing device; detecting an edge of thesource image; calculating an edge width measure of the edge; andretrieving a depth from the edge width measure.
 2. The method as claimedin claim 1 wherein detecting the edge includes detecting a vertical stepedge and an arbitrary edge.
 3. The method as claimed in claim 1 furthercomprising: calculating an edge profile of the edge; calculating agradient profile of the edge profile; smoothing out a noise of thegradient profile; and calculating the edge width measure of the smoothedgradient profile.
 4. The method as claimed in claim 1 furthercomprising: pre-calculating the edge width measures; storing the edgewidth measures in an edge width measures plot or look up tables; andretrieving the lens setting through the edge width measures plot or lookup tables.
 5. The method as claimed in claim 1 further comprising:calculating an edge direction of the edge; interpolating an interpolatedpixel along an interpolation path; and calculating a gradient profile ofthe interpolated pixels.
 6. A method of operation of an image processingsystem comprising: providing an image processing device with a lenssystem; receiving a source image captured by the image processingdevice; detecting an edge of the source image; calculating an edge widthmeasure of the edge; retrieving an optimal lens setting having the leastedge width measure; and adjusting the lens system to an optimal lenssetting.
 7. The method as claimed in claim 6 wherein detecting the edgeincludes running a Canny edge detection to detect a vertical step edgeand an arbitrary edge.
 8. The method as claimed in claim 6 furthercomprising: calculating an edge profile of the edge; calculating firstderivative of the edge profile to create a gradient profile; smoothingout a noise of the gradient profile by eliminating a small gradientunder a gradient threshold; and calculating second moment of thesmoothed gradient profile to create the edge width measure.
 9. Themethod as claimed in claim 6 further comprising: pre-calculating theedge width measures; storing the edge width measure in an edge widthmeasures plot or look up tables; and retrieving the optimal lens settingthrough edge width measures plot or look up tables.
 10. The method asclaimed in claim 6 further comprising: detecting an edge pixel of theedge; calculating an edge direction of the edge pixel; interpolating aninterpolated pixel along an interpolation path perpendicular to the edgedirection; and calculating a gradient profile of the interpolated pixelsalong the interpolation path.
 11. An image processing system comprising:an image processing device; an image capture module for capturing asource image on the image processing device; an assessment module fordetecting an edge of the source image, and measuring an edge widthmeasure of the edge; and a retrieving module for retrieving a depth offield from the edge width measure.
 12. The system as claimed in claim 11wherein the assessment module for detecting the edge includes a verticalstep edge and an arbitrary edge.
 13. The system as claimed in claim 11further comprising: an edge profile module for generating an edgeprofile of the edge; a gradient profile module for generating a gradientprofile of the edge profile; a smoothing module for generating asmoothed gradient profile; and an edge measure module for measuring theedge width measure of the smoothed gradient profile.
 14. The system asclaimed in claim 11 further comprising: an lens data module forcalculating and storing an edge width measures plot or look up tables;and the retrieving module for retrieving the depth through the edgewidth measures plot or look up tables.
 15. The system as claimed inclaim 11 further comprising: an edge detect module for detecting an edgedirection of the edge; an interpolation module for interpolating aninterpolated pixel along an interpolation path perpendicular to thearbitrary edge direction; and the edge profile module for generating agradient profile of the interpolated pixels.
 16. The system as claimedin claim 11 further comprising: an image processing device with a lenssystem; an image capture module for capturing a source image on theimage processing device; an assessment module for detecting an edge ofthe source image, and measuring an edge width measure of the edge; and aretrieving module for retrieving an optimal lens setting having theleast edge width measure.
 17. The system as claimed in claim 16 whereinthe assessment module for detecting the edge includes a Canny edgedetection for detecting a vertical step edge and an arbitrary edge. 18.The system as claimed in claim 16 further comprising: an edge profilemodule for generating an edge profile of the edge; a gradient profilemodule for generating a gradient profile of the edge profile, whereinthe gradient profile is first derivative of the edge profile; asmoothing module for generating a smoothed gradient profile having agradient value greater than a gradient threshold; and an edge measuremodule for measuring the edge width measure of the smoothed gradientprofile, wherein the edge width measure is second moment of the smoothedgradient profile.
 19. The system as claimed in claim 16 furthercomprising: an lens data module for calculating and storing an edgewidth measures plot or look up tables of the edge width measure; and theretrieve module for retrieving an optimal lens setting through the edgewidth measures plot or look up tables.
 20. The system as claimed inclaim 16 further comprising: an edge detect module for detecting an edgepixel of the edge, and calculating an arbitrary edge direction of theedge pixel; an interpolation module for interpolating an interpolatedpixel along an interpolation path perpendicular to the arbitrary edgedirection; and the edge profile module for generating a gradient profileof the interpolated pixels along the interpolation path.